package com.ruoyi.web.service;

import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.web.domain.QgPayWithdrawalDetail;
import com.ruoyi.web.dto.QgPayWithdrawalDetailAddDTO;
import com.ruoyi.web.dto.QgPayWithdrawalDetailRejectDTO;

import java.util.List;

/**
 * QGPay提现明细Service接口
 *
 * @date 2023-03-15
 */
public interface IQgPayWithdrawalDetailService {
    /**
     * 查询QGPay提现明细
     *
     * @param id QGPay提现明细主键
     * @return QGPay提现明细
     */
    QgPayWithdrawalDetail selectQgPayWithdrawalDetailById(Long id);

    /**
     * 查询QGPay提现明细列表
     *
     * @param qgPayWithdrawalDetail QGPay提现明细
     * @return QGPay提现明细集合
     */
    List<QgPayWithdrawalDetail> selectQgPayWithdrawalDetailList(QgPayWithdrawalDetail qgPayWithdrawalDetail);

    /**
     * 新增QGPay提现明细
     *
     * @param qgPayWithdrawalDetail QGPay提现明细
     * @return 结果
     */
    int insertQgPayWithdrawalDetail(QgPayWithdrawalDetail qgPayWithdrawalDetail);

    /**
     * 修改QGPay提现明细
     *
     * @param qgPayWithdrawalDetail QGPay提现明细
     * @return 结果
     */
    int updateQgPayWithdrawalDetail(QgPayWithdrawalDetail qgPayWithdrawalDetail);

    /**
     * 批量删除QGPay提现明细
     *
     * @param ids 需要删除的QGPay提现明细主键集合
     * @return 结果
     */
    int deleteQgPayWithdrawalDetailByIds(Long[] ids);

    /**
     * 删除QGPay提现明细信息
     *
     * @param id QGPay提现明细主键
     * @return 结果
     */
    int deleteQgPayWithdrawalDetailById(Long id);

    /**
     * 创建提现申请
     *
     * @param dto dto
     * @return {@link String}
     * @since 2023/3/22 14:54
     */
    void add(QgPayWithdrawalDetailAddDTO dto);

    /**
     * 审核通过
     *
     * @param id id
     * @since 2023/3/22 16:12
     */
    void approve(Long id);

    /**
     * 审核拒绝
     *
     * @param dto dto
     * @since 2023/3/22 16:51
     */
    void reject(QgPayWithdrawalDetailRejectDTO dto);

    /**
     * QGPay代付通知
     *
     * @param dto 通知
     * @since 2023/3/17 14:21
     */
    void qgSingleOrderNotify(JSONObject dto);

    /**
     * h5分页查询
     *
     * @param condition 查询条件
     * @return {@link List< QgPayWithdrawalDetail>}
     * @since 2023/3/22 16:58
     */
    List<QgPayWithdrawalDetail> appPage(QgPayWithdrawalDetail condition);
}
